package com.redoor.app.stake.common.controller;

import org.apache.shiro.authz.AuthorizationException;
import org.apache.shiro.authz.UnauthorizedException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.ExceptionHandler;
import java.util.Date;

/**
 * Created by wangjunlei on 2018/2/2.
 * upate 添加Shiro异常处理 zhangYiHang
 */
public abstract  class BaseController {
    final Logger logger = LoggerFactory.getLogger(this.getClass());
    /**
     * 权限异常
     */
    @ExceptionHandler({ UnauthorizedException.class, AuthorizationException.class })
    public void authorizationException() {
        logger.error("shiro not params ," + new Date());
    }
}

